<template>
    <div>
        <h1>博客 ID: {{ postId }}</h1>
    </div>
</template>
<script setup>
import {ref} from 'vue'
import { useRoute } from 'vue-router';
const route = useRoute();
// 获取路由参数 id 
const postId = ref(route.params.id);
</script>